<%-- 
    Document   : productsFound
    Created on : 10-gen-2013, 10.20.43
    Author     : Luciano
--%>

<%@page import="it.unitn.science.matr155863_148346_145963.bccastestore.DBManager"%>
<%@page import="it.unitn.science.matr155863_148346_145963.bccastestore.items.User"%>
<%@page import="java.util.List"%>
<%@page import="it.unitn.science.matr155863_148346_145963.bccastestore.items.Product"%>
<%@page import="it.unitn.science.matr155863_148346_145963.bccastestore.items.Product"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>


<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Product Found</title>
    </head>
    <body>
        <%
         List<Product> p=(List<Product>)request.getAttribute("products");
        %>
        
        <div class="content">
            <h2>Product found:</h2>
            <%
                if(p.isEmpty()){
                    out.println("<h2>No products found</h2>");
                }
               for(Product pr:p){   
                   request.setAttribute("product", pr);
                    %>   
                    <jsp:include page="./productDetails" flush="true" />
                    <%   
               }
            %>                      
        </div>
    </body>
</html>
